var fs=require('fs');
var log=require('log');
//before(loadPost, {only: ['show', 'edit', 'update', 'destroy']});

action('upload', function () {
	log.info('upload file');
	if(!req.form){
		send('true');
		return;
	}
	var tmpFile = req.form.files.file;
	fs.rename(tmpFile.path,'E:\\work\\catnode\\svn\\public\\data\\'+tmpFile.name,function(err){
		console.log(err);
		send('hello');
	});
});
action(function del(){
	fs.unlink('', function(err){
		console.log(err);
	});
	//send('hhh');
	layout(false);
	render();
});

action(function index(){
	log.debug('upload debug');
	log.info('upload info');
	log.error('upload error');
	console.log(log);
	layout(false);
	render();
}
);